<?php

class CheckController extends Controller {

    public function actionShow() {    
        if(Yii::app()->request->isPostRequest){
            //var_dump($_POST);
            $num = trim($_POST['num']);
            $checkinfo = CsXcImportinfo::model()->findByAttributes(array("policyNum"=>$num));
            //var_dump($checkinfo);
            if($checkinfo){
                //echo 111;
                $id = $checkinfo['in_company'];
                //var_dump($checkinfo['in_company']);
                $this->render("out",array('id'=>$id));
            }else{
                $this->render("fail",array());
            }             
        }else{
           $this->render("show",array()); 
        }
    }
    public function actionOut() {
        $this->render("out",array());
    }
    public function actionFail() {
        $this->render("fail",array());
    }
    
  
}